home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c++-part2 / 10573 < prev    next >
Encoding:
Internet Message Format  |  1996-08-05  |  1.8 KB

  1. Path: cliffy.lfwc.lockheed.com!news
  2. From: Ken Garlington <GarlingtonKE@lfwc.lockheed.com>
  3. Newsgroups: comp.lang.ada,comp.lang.c,comp.lang.c++
  4. Subject: Re: C/C++ knocks the crap out of Ada
  5. Date: Fri, 08 Mar 1996 12:02:02 +0000
  6. Organization: Lockheed Martin Tactical Aircraft Systems
  7. Message-ID: <314021BA.3C57@lfwc.lockheed.com>
  8. References: <00001a73+00002504@msn.com> <4hmlca$a30@solutions.solon.com> <4hn50pINN4r8@keats.ugrad.cs.ubc.ca> <313EE686.25CD@lfwc.lockheed.com> <4hnimb$elm@solutions.solon.com>
  9. NNTP-Posting-Host: cliffy.lfwc.lockheed.com
  10. Mime-Version: 1.0
  11. Content-Type: text/plain; charset=us-ascii
  12. Content-Transfer-Encoding: 7bit
  13. X-Mailer: Mozilla 2.0 (Macintosh; I; 68K)
  14.  
  15. Peter Seebach wrote:
  16. > Ken Garlington  <GarlingtonKE@lfwc.lockheed.com> wrote:
  17. > >Kazimir Kylheku wrote:
  18. > >> The only thing that bitfields are good for, portably, is optimizing the
  19. > >> storage of small signed or unsigned integers or flag sets, at some
  20. > >> computational expense.
  21. > >Or, for example, implementing standard communications protocols used frequently
  22. > >in embedded systems, such as MIL-STD-1553.
  23. > But then that's not "portable" - he did say "portably".  Most things like that
  24. > can't be done portably anyway, so are not at issue.
  25.  
  26. It can be _extremely_ portable -- between different compilers, between different
  27. CPUs, and between different systems. Can you find a case where it won't port?
  28. Probably. Nonetheless, it will port quite well in a lot of cases. And since it's
  29. a _standard_ protocol, it's worth writing in a portable manner. I don't know
  30. whether the C equivalent is portable or not, but I do know that the Ada approach
  31. to bitfields can port quite well. Part of that portability, of course, comes from
  32. the abilities of the language.
  33.  
  34. These cases may not come up much in classic client/server programming, etc.
  35. but they come up often in embedded systems.
  36.